<?php


namespace App\Http\Controllers\Admin;


use App\Http\Controllers\Controller;
use App\Model\Order;

class OrderController extends Controller
{
    /**
     * 获取订单列表
     * @return \Illuminate\Http\JsonResponse
     */
    public function index(){
        $order = Order::with('product')
            ->with('user')
            ->orderBy('id','desc')
            ->paginate('10');
        return JsonResponse(200,true,'获取成功',$order);
    }
}
